﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

namespace ns
{
    /// <summary>
    /// 预制体（这里只用在预制体）路径读取
    /// </summary>
    public class ObjectConfigurationReaderFactory
    {
        private static Dictionary<string, ObjectConfigurationReader> cache;
        static ObjectConfigurationReaderFactory()
        {
            cache = new Dictionary<string, ObjectConfigurationReader>();
        }
        public static Dictionary<string,string> GetMap(string fileName)//复用的时候这里返回类型要改
        {
            if (!cache.ContainsKey(fileName))
            {
                cache.Add(fileName,new ObjectConfigurationReader(fileName));
            }
            return cache[fileName].Map;
        }
    }
}